<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>推荐图片列表</title>
    <meta name="viewport" content="width=device-width,initial-scale=1,maximum-scale=1.0" />
    <#include "/view/admin/head.html"/>
    <style type="text/css">
        .table-class{
            width:90%;
            text-align: center;
            border:1px solid #afd9ee;
            margin:0 auto;
            margin-top: 50px;
        }
        .list-path{
            height: 50px;
            line-height: 50px;
            background-color: #9acfea;

        }
        table{table-layout:fixed;word-break:break-all;}

        table th{
            text-align: center;
        }
        table thead tr {
            background-color: #9acfea;
        }
        .table-query{
            /*height: 40px;*/
            /*width:80px;*/
            /*text-align: center;*/
            white-space:nowrap;
            /*position: relative;*/
            float: left;
            display:inherit;
            /*display: inline;*/


        }
        .template-muban{
            /*display: inline;*/
            /*position: relative;*/
            float: right;
            margin-top:25px;
            margin-right: 30px;

        }
        .label-head{
            height: 60px;
            width: 100%;
        }
    </style>
    <script type="text/javascript">
        function query(dm){
            var val = $('#q').val();
            location.href='${base}/recommendpic/list.do?q='+val;
        }
    </script>
</head>
<body>

<div class="list-path" > <span style="margin-left: 50px;"><span class="glyphicon glyphicon-home"></span> 用户推荐列表</span>
    <div style="float: right; margin-right: 40px;">
        <a class="btn btn-info"
           href="javascript:window.history.go(-1)">返回</a>
    </div>
</div>

<div class="table-class">
    <div class="label-head">
        <div class="input-group table-query" style="margin-top:25px;margin-left: 50px;">
            <input type="text" class="form-control" id="q" name="q" value="${q!}" placeholder="微信用户昵称" style="width: 200px;" >
            <a class="btn btn-info" href="javascript:query(this)"><span class="glyphicon glyphicon-search"></span> 查找</a>


        </div>
        <div class="template-muban"><a href="${base}/recommendpic/template.do" class="btn btn-info" >默认模板配置</a></div>
    </div>


    <hr/>

    <table class="table table-hover table-bordered">
        <thead>
        <tr>
            <th>序号</th>
            <th style="WORD-WRAP: break-word" width="200">标题</th>
            <th style="WORD-WRAP: break-word" width="200">外链接</th>
            <th>微信用户昵称</th>
            <th>弹出图片</th>
            <th>最近弹出时间</th>
            <th>创建时间</th>
            <th>显示或隐藏</th>
            <th>使用默认模板显示</th>
            <th>操作</th>
        </tr>
        </thead>
        <tbody>
        <#list pagination.list as c>
            <tr>
                <td>${(pagination.pageNo-1)*pagination.pageSize+1+c_index}</td>
                <td>${c.title!}</td>
                <td><a href="${c.url!}" target="_blank">${c.url!}</a></td>
                <td><img src="${c.headimgurl!}" height="50px">${c.nickname!}</td>
                <td><img src="${base}${c.picPath!}" height="50px"></td>
                <td><#if (c.updateDate)?? >${c.updateDate?string('yyyy-MM-dd HH:mm')}</#if></td>
                <td><#if (c.createtime)?? >${c.createtime?string('yyyy-MM-dd HH:mm')}</#if></td>
                <td>
                    <#if c.display??>
                        <#if 0==c.display><span class="label label-default">隐藏</span></#if>
                        <#if 1==c.display><span class="label label-success">显示</span></#if>
                    </#if>
                </td>
                <td>
                    <#if c.usetemplate??>
                        <#if 0==c.usetemplate><span class="label label-default">否</span></#if>
                        <#if 1==c.usetemplate><span class="label label-success">是</span></#if>
                    </#if>
                </td>

                <td>
                    <a href="${base}/recommendpic/detail.do?id=${c.recommendpicId!}" class="btn btn-primary">详情</a>
                </td>
            </tr>


        </#list>
        <#if 0==pagination.totalCount>
            <tr>
                <td colspan="7" style="color: red"> 没有相关数据 </td>
            </tr>
        </#if>




        </tbody>
    </table>
    <#include "/view/admin/pagination.html"/>


</div>
<script>
    function setPage(pageNo,pageSize){
        var href = "${base}/recommendpic/list.do?";



        href+="pageNo="+pageNo;
        href+="&pageSize="+pageSize;
        location.href=href;
    }

</script>

</body>
</html>
